
from ScanEvent import sanitizeForward
from ScanEvent import sanitizeBackward

#def sanitizeForward(charDilimiterToBeReplaced, strNameOfChar, strToBeForwardEncoded):
#def sanitizeBackward(charDilimiterReplaced, strNameOfChar, strToBeBackwardDecoded):
userInput1 = "BARR BBAR (BAR) _BAR_ | (|) || (||)"
print userInput1
userEncoded1 = sanitizeForward('|', "Bar", userInput1)
print userEncoded1
userDecoded1 = sanitizeBackward('|', "Bar", userEncoded1)
print userDecoded1
print ""

userInput2 = "Bar|Bar|||BarBar(Bar|)|Bar(Bar|)BBar|)(|_)BAR"
print userInput2
userEncoded2 = sanitizeForward('|', "Bar", userInput2)
print userEncoded2
userDecoded2 = sanitizeBackward('|', "Bar", userEncoded2)
print userDecoded2
print ""

userInput3 = "_Bar_|_Bar|||_Bar_Bar_Bar_|Bar(Bar|)BBar|)(|_)BAR_Bar_Bar_"
print userInput3
userEncoded3 = sanitizeForward('|', "Bar", userInput3)
print userEncoded3
userDecoded3 = sanitizeBackward('|', "Bar", userEncoded3)
print userDecoded3


